package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.entity.User;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {


    /**
     * 根据OpenId查询用户
     * @param openId
     * @return
     */
    @Select("select * from sky_take_out.user where openid = #{openId};")
    User getByOpenId(String openId);

    /**
     * 新建用户
     * @param user
     */
    void insert(User user);
    @Select("select * from sky_take_out.user where id = #{userId};")
    User getById(Long userId);
}
